<?php 
$double_list_submit = "";
foreach ($this->getColumnCategories('edit.display') as $category)
{
foreach ($this->getColumns('edit.display', $category) as $name => $column)
{
if (false !== strpos($this->getParameterValue('edit.fields.'.$column->getName().'.type'), 'admin_double_list'))
{
  $double_list_submit ='double_list_submit();';
  break 2; 
}
}
}
?>
[?php
 $tabs = sfContext::getInstance()->getRequest()->getParameter('tabs', null);
 $params_tabs = "";
 $div_update = "div_panel_contenido";
 if($tabs != null)
 { 
 	?]
 	<input type="hidden" value="[?php echo $tabs ?]" name="tabs" id="tabs">
 	[?php
 
<?php if($this->getParameterValue('tabs', 0) == 0): ?>
      $div_update = "div_tab_<?php echo $this->getModuleName()?>";
<?php endif; ?>
   $params_tabs = "tabs=tabs";
 }
?]

[?php use_helper('Window') ?]
<ul class="sf_admin_actions">
  <?php //echo $this->getButtonToAction('_list', array(), true) ?>
  <?php echo $this->getButtonToActionAjax('_save', array('name'=>'Guardar','params_ajax'=>'condition= validate(this.form) before='.$double_list_submit), true) ?>
[?php
 $tipo_despliegue = sfContext::getInstance()->getRequest()->getParameter('tipo_despliegue', 'div');
 if($tipo_despliegue == 'div'): ?]

<?php echo $this->getButtonToActionAjax('_save_and_add', array('name'=>'Guardar y Adicionar', 'params_ajax'=>'condition= validate(this.form) before='.$double_list_submit), true) ?>
[?php endif; ?]

<?php $editActions = $this->getParameterValue('edit.actions') ?>
<?php if (null !== $editActions): ?>
<?php foreach ((array) $editActions as $actionName => $params): ?>
  <?php if ($actionName == '_delete') continue ?>
  <?php echo $this->addCredentialCondition($this->getButtonToActionAjax($actionName, $params, true), $params) ?>
<?php endforeach; ?>
<?php endif; ?>


</ul>
